<template>
  <div class="order_container">
    <my-bread :list="['订单管理', '订单列表']"></my-bread>
    <el-card class="box-card">
      <el-row>
        <el-col :span="6">
          <el-input placeholder="请输入内容" v-model="reqParams.query">
            <el-button slot="append" icon="el-icon-search" @click="search()"></el-button>
          </el-input>
        </el-col>
      </el-row>
      <el-table :data="orderList" style="width:100%">
        <el-table-column type="index"></el-table-column>
        <el-table-column label="订单编号" prop="order_number" width="300"></el-table-column>
        <el-table-column label="订单金额" prop="order_price"></el-table-column>
        <el-table-column label="是否付款">
          <template slot-scope="scope">
            <el-tag type="danger">{{scope.row.pay_status ===1 ?"已付款" : "未付款"}}</el-tag>
          </template>
        </el-table-column>
        <el-table-column label="是否发货" prop="is_send"></el-table-column>
        <el-table-column label="下单时间" prop="create_time" width="250">
          <template slot-scope="scope">{{scope.row.create_time | ft}}</template>
        </el-table-column>
        <el-table-column label="操作">
          <template>
            <el-button icon="el-icon-edit" circle></el-button>
            <el-button icon="el-icon-location" circle @click="dialogVisible=true"></el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination layout="prev, pager, next" :page-count="total" @current-change="pager"></el-pagination>
      <el-dialog title="物流信息" :visible.sync="dialogVisible">
        <el-timeline>
          <el-timeline-item
            v-for="(activity, index) in activities"
            :key="index"
            :timestamp="activity.time"
          >{{activity.context}}</el-timeline-item>
        </el-timeline>
        <span slot="footer" class="dialog-footer">
          <el-button @click="dialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
        </span>
      </el-dialog>
    </el-card>
  </div>
</template>

<script>
import mixin from "./Orders-Mixin.js";
export default {
  mixins: [mixin]
};
</script>

<style lang="less" scoped></style>
